Skip to content

Add transaction submission failure hook and error handling#366

Merged
GabrielMartinezRodriguez merged 4 commits intomasterfrom
gabriel/txm-submission-failed-hook
Feb 10, 2025
Merged

Add transaction submission failure hook and error handling#366
GabrielMartinezRodriguez merged 4 commits intomasterfrom
gabriel/txm-submission-failed-hook

Conversation

@GabrielMartinezRodriguez
Copy link
Contributor

@GabrielMartinezRodriguez GabrielMartinezRodriguez commented Jan 22, 2025

Linked Issues

Description

  • Creating a new TransactionSubmissionFailed hook to capture submission failures
  • Adding error logging for transaction submission failures in the randomness service
Toggle Checklist

Checklist

Basics

  • B1. I have applied the proper label & proper branch name (e.g. norswap/build-system-caching).
  • B2. This PR is not so big that it should be split & addresses only one concern.
  • B3. The PR targets the lowest branch it can (ideally master).

Correctness

  • C1. Builds and passes tests.

  • C2. The code is properly parameterized & compatible with different environments.

  • C3. I have manually tested my changes & connected features.

  • C4. I have performed a thorough self-review of my code after submitting the PR.

Architecture & Documentation

  • D1. I made it easy to reason locally about the code.
  • D2. All public-facing APIs & meaningful internal APIs are properly documented.
  • D3. If appropriate, the general architecture is documented.

@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title feat(txm): add transaction submission failure hook and error handling Add transaction submission failure hook and error handling Jan 22, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 22, 2025

Deploying happychain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2c9bf41
Status: ✅  Deploy successful!
Preview URL: https://dd973ade.happychain.pages.dev
Branch Preview URL: https://gabriel-txm-submission-faile.happychain.pages.dev

View logs

@GabrielMartinezRodriguez GabrielMartinezRodriguez marked this pull request as ready for review January 22, 2025 16:25
@linear
Copy link

linear bot commented Jan 22, 2025

HAPPY-282 Hook to notify the library user about issues before submitting their transactions.

We want to notify users about potential issues that may occur before submitting their transactions, such as problems encountered when simulating a transaction. These issues could result in the transaction remaining indefinitely in our database while attempting to be included, without notifying the user.

Another good idea would be to implement a system that allows users to modify the parameters of such transactions to resolve these issues, for example, by changing the call data. Additionally, it should also be possible for users to remove these transactions.

@GabrielMartinezRodriguez GabrielMartinezRodriguez added the reviewing-1 Ready for, or undergoing first-line review label Jan 22, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from 8cfe729 to f8117b9 Compare January 22, 2025 16:39
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from f8117b9 to a98fbb3 Compare January 23, 2025 10:38
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from a98fbb3 to 82a0cb6 Compare January 23, 2025 14:45
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from 82a0cb6 to 98067ed Compare January 31, 2025 14:44
@GabrielMartinezRodriguez GabrielMartinezRodriguez mentioned this pull request Feb 3, 2025
10 tasks
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from 70e6dc4 to 55a5c0a Compare February 3, 2025 13:16
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from 55a5c0a to 6749747 Compare February 4, 2025 13:51
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from 6749747 to f5a61b6 Compare February 5, 2025 14:03
@aodhgan aodhgan added reviewing-2 Ready for, or undergoing final review and removed reviewing-1 Ready for, or undergoing first-line review labels Feb 6, 2025
eventBus.emit(Topics.TransactionSubmissionFailed, {
transaction,
description: submissionResult.error.description,
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea to also pass the cause from the AttemptSubmissionErrorCause enum (and export that publicly) so that might enable finer-grained reaction to this without needing to parse the description.

@norswap norswap added merge-blocked-after-changes Ready to merge but waiting for downstack, after requested changes are made and removed reviewing-2 Ready for, or undergoing final review labels Feb 9, 2025
@norswap norswap force-pushed the gabriel/txm-increase-timeout branch from 877ca68 to fab80c3 Compare February 10, 2025 20:23
@norswap norswap force-pushed the gabriel/txm-submission-failed-hook branch from f5a61b6 to 05dc512 Compare February 10, 2025 20:23
Base automatically changed from gabriel/txm-increase-timeout to master February 10, 2025 20:31
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-submission-failed-hook branch from 05dc512 to b9ba93f Compare February 10, 2025 20:33
@GabrielMartinezRodriguez GabrielMartinezRodriguez added merge-blocked Ready to merge, waiting for downstack and removed merge-blocked-after-changes Ready to merge but waiting for downstack, after requested changes are made labels Feb 10, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez merged commit 597fa82 into master Feb 10, 2025
3 checks passed
@GabrielMartinezRodriguez GabrielMartinezRodriguez deleted the gabriel/txm-submission-failed-hook branch February 10, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-blocked Ready to merge, waiting for downstack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants